//
//  NSString+Arithmetic.h
//  KLCurrency
//
//  Created by apple on 2017/12/3.
//  Copyright © 2017年 bonc. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Arithmetic)

/**
 *  将汉字转换为小写拼音字符串
 */
+ (NSString *)transformToPinyin:(NSString *)chinese;

/**
 *  转换为逗号分割
 */
+ (NSString *)convertToDecimalStyleFromEditingString:(NSString *)str;

/**
 *  转换为逗号分割，保留2位小数
 */
+ (NSString *)convertToDecimalStyleWithTwoDigitsFromString:(NSString *)str;

/**
 * 判断字符串中是否包含运算符
 */

+ (BOOL)containOperatorInString:(NSString *)str;

/**
 *  判断输入单个字符后数字是否非法
 */
+ (BOOL)illegalSingleNumber:(NSString *)originSingleNumberText withInput:(NSString *)input;
/**
 *  如果合法合成有效的字符串
 */
//- (NSString *)changeSingleNumberWithInput: (NSString *)input;
+ (NSString *)changeSingleNumber:(NSString *)originSingleNumberText withInput: (NSString *)input;
/**
 *  判断输入单个字符后计算式是否非法
 */
+ (BOOL)illegalArithmeticText:(NSString *)originArithmeticText withInput:(NSString *)input;

/**
 *  如果合法合成有效的字符串
 */
+ (NSString *)changeArithmeticText:(NSString *)originArithmeticText withInput:(NSString *)input;
/**
 *  计算等式的值
 */
+ (NSString *)calculateArithmeticTextValue:(NSString *)originArithmeticText;

@end
